package model

import (
	"time"

	"gorm.io/gorm"
)

type BaseModel struct {
	ID int32 `gorm:"primarykey"`
	CreatedAt time.Time `gorm:"column:add_time"`
	UpdateAt time.Time `gorm:"column:update_time"`
	DeleteAt gorm.DeletedAt
	IsDeleted bool
}
type User struct {
	BaseModel
	Mobile string `gorm:"index:idx_mobile;unique;type:varchar(11);not null"`
	Password string `gorm:"type:varchar(100);not null"`
	NickName string `gorm:"type:varchar(20)"`
	Birthday *time.Time `gorm:"type:datetime"`
	Gender string `gorm:"column:gender;default:male;type:varchar(6);comment:female表示女，male表示男"`
	Role int `gorm:"column:role;default:1;comment:1表示普通用户,2表示管理员"`
	Email string `gorm:"column:email;comment:用户邮箱"`

}